Subject: SAS6.1 users: please read
From: [email-masked] (Steve Koren)
Date: 2 Dec 92 04:07:32 GMT
Newsgroups: comp.sys.amiga.programmer

I am posting this note to let SAS 6.1 users know of a serious
problem I have found which can cause insiduous problems with
your code.  I have sent this to EMITS and am just pointing
it out here in hopes someone else can avoid what I ran in to.
I thought twice about posting it here because I do not want
to reflect badly on SASC, which is wonderful in general.  But
I decided that the magnitude of the problem warrents a warning
to other users.  I'm sure they'll fix it right pronto.  SAS has
been very responsive to fixing things reported via EMITS, and
collectively deserve our appriciation for that I think.

Consider this code:

/***********************************************************************
 **   sc test1.c
 **   slink from lib:c.o test1.o to test1 lib lib:sc.lib
 ***********************************************************************/

# include <stdio.h>
# include <string.h>

main(int argc, char **argv) {
   char *str = "abc";
   int  num = 7;

   if ((strlen(str) - num) > 0) {
      printf("Ooops!\n");
   }

   exit(0);
}

Even though one would expect
   if ((strlen(str) - num) > 0) {

in cases where strlen(str)=3 and num=7 to fail (ie, 3-7 is -4,
and -4 is NOT greater than 0 last time I checked), the if
statement passes instead.

I hope this helps someone else avoid the code problems I was
having.  I'm sure they'll fix this for 6.2.  SASC continues,
IMHO, to be the best development environment for the Amiga bar
none.

  - steve